<small>
 <script type="text/javascript" src="/js/bootstrap-datetimepicker.min.js"></script>
 <script type="text/javascript" src="/js/DatePicker/WdatePicker.js" ></script>
<div class="row"> 
  <div class="span3 bs-docs-sidebar "> <*include file="<*$controller*>/location.tpl"*></div>
 <div class="span8"> 
      <form class="form-horizontal" id="regform" name="regform" action="/<*$controller*>/opproduct" method="post" onsubmit="return checkLoginForm();">
        <div class="control-group">
          <label class="control-label" for="inputEmail"><strong>产品名称</strong></label>
          <div class="controls">
            <input type="text" id="productname" name="productname" placeholder="产品名称">
              <div id="pnotice" style="color:#F00">
              </div>
          </div>
          
        </div>
       <div class="control-group">
          <label class="control-label" for="inputEmail"><strong>产品价格(元)</strong></label>
          <div class="controls">
            <input type="text" id="productprice" name="productprice" placeholder="产品价格">
            <div id="pricenotice" style="color:#F00">
              </div>
          </div>
        </div> 
        <div class="control-group">
          <label class="control-label" for="inputEmail"><strong>产品描述</strong></label>
          <div class="controls"> 
            <textarea  row="30" cols="30" id="productdetail" name="productdetail" placeholder="产品描述" ></textarea>
          </div>
        </div>  
        
        <div class="control-group">
          <label class="control-label" for="inputPassword"><strong>产品类型</strong></label>
          <div class="controls">
            <label class="radio inline">
  				  <input type="radio" name="producttype" id="base" value="base"> 基础服务
 		   </label>
           
           <label class="radio inline">
  				  <input type="radio" name="producttype" id="album" value="album"> 相册
 		   </label>
           
           <label class="radio inline">
  				  <input type="radio" name="producttype" id="courseware" value="courseware" > 课件
 		   </label> 
          </div> 
        </div>   
        
        <div class="control-group">
          <label class="control-label" for="开始时间"><strong>开始时间</strong></label>
          <div class="controls" >
            <div class="input-append"  >
            <input type="text" name="starttime" id="starttime"  class="input-small" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" language="UTF-8" ></input>
            <span class="add-on">
                 <i data-time-icon="icon-time" class="icon-calendar">
                 </i>
             </span>
             </div>
           </div>
	    </div>
          <div class="control-group">
          <label class="control-label" for="结束时间"><strong>结束时间</strong></label>
          <div class="controls" >
            <div class="input-append"  >
            <input type="text" name="endtime" id="endtime"  class="input-small" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" language="UTF-8" ></input>
            <span class="add-on">
                 <i data-time-icon="icon-time" class="icon-calendar">
                 </i>
             </span>
             </div>
           </div>
	    </div> 
        
        <div class="control-group">
          <div class="controls"> 
              <button class="btn btn-large   btn-primary" type="submit">提交</button>
              <button class="btn btn-large" onClick="history.back();" type="button" >返回</button>
          </div>
        </div>  
      </form>
     </div> 
</div>
<script type="text/javascript">
  
  
function checkLoginForm(){
	
	var ammount=document.getElementById('productname').value; 
	if(ammount=='' || ammount==null){ 
	      alert('填写商品名称');  
		document.getElementById("productname").focus();
		return false;
	}  
	
	//产品价格
	var productprice=document.getElementById('productprice').value; 
	if(productprice=='' || productprice==null){  
	    alert('填写商品价格'); 
		document.getElementById("productprice").focus();
		return false;
	} 
	
	 var  list = document.getElementsByName("producttype");  
      var  typelist='';
	  for( i =0 ; i<list.length; i++ )
  		{  
			if( list[i].checked==true ){
				 var  typelist=i+1;
				 } 
  		}  
	if(typelist=='' || typelist==null){
		alert('请填写产品的类型'); 
		return false;
	  } 
	 
	return true;
}

</script>
</small> 